
/*
 * Hlpay-Plus aggregate payment system.
 * Copyright (c) 2024-2025 Hlpay Team Copyright has the right of final interpretation.
 *
 */

package com.hlkj.pay.common;

import com.hlkj.pay.infrastructure.model.token.TokenSecretDO;
/**
 * @author HlpayTeam
 * @date 2022/12/07 10:55
 */
public class TenantSecretContext {

    private static ThreadLocal<TokenSecretDO> authThreadLocal = new ThreadLocal();

    public TenantSecretContext() {
    }

    public static TokenSecretDO get() {
        return (TokenSecretDO) authThreadLocal.get();
    }

    public static void set(TokenSecretDO tenantSecretDO) {
        authThreadLocal.set(tenantSecretDO);
    }

    public static void destroy() {
        authThreadLocal.remove();
    }

}
